package com.chinasoft.maysham.manager.repo;

import com.chinasoft.maysham.manager.model.Cluster;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Repository;

@Repository
public class ClusterRepo extends BaseRepo{

    public boolean existByNameAndTag(String name, String tag) {
        return template.exists(Query.query(Criteria.where("name").is(name).and("tag").is(tag).and("deleted").is(false)), Cluster.class);
    }
}
